package com.accesshollywood.grfxOrdering.core;

import com.accesshollywood.indexables.GrfxOrder;
import com.accesshollywood.indexables.items.FootageSet;
import com.accesshollywood.indexables.items.StillSet;
import com.accesshollywood.indexables.items.TextSet;

public class CoreGrfxItem {
	private String		filename	= "";
	private TextSet	textList	= new TextSet();
	private StillSet	stillList	= new StillSet();
	private FootageSet	footageList	= new FootageSet();
	private String notes = "";

	private boolean needsResearch = false;
	private boolean needsPhotoEdit = false;
	private boolean needsFootage = false;
	private boolean needsLegal = false;

	private boolean apprResearch = false;
	private boolean apprPhotoEdit = false;
	private boolean apprFootage = false;
	private boolean apprLegal = false;
	
	private GrfxOrder grfxOrder;

	public synchronized String getFilename() {
		return filename;
	}

	public synchronized void setFilename(String filename) {
		this.filename = filename;
	}

	public synchronized TextSet getTextList() {
		return textList;
	}

	public synchronized void setTextList(TextSet textList) {
		this.textList = textList;
	}

	public synchronized StillSet getStillList() {
		return stillList;
	}

	public synchronized void setStillList(StillSet stillList) {
		this.stillList = stillList;
	}

	public synchronized FootageSet getFootageList() {
		return footageList;
	}

	public synchronized void setFootageList(FootageSet footageList) {
		this.footageList = footageList;
	}

	public synchronized String getNotes() {
		return notes;
	}

	public synchronized void setNotes(String notes) {
		this.notes = notes;
	}

	public synchronized boolean needsResearch() {
		return needsResearch;
	}

	public synchronized void setNeedsResearch(boolean needsResearch) {
		this.needsResearch = needsResearch;
	}

	public synchronized boolean needsPhotoEdit() {
		return needsPhotoEdit;
	}

	public synchronized void setNeedsPhotoEdit(boolean needsPhotoEdit) {
		this.needsPhotoEdit = needsPhotoEdit;
	}

	public synchronized boolean needsFootage() {
		return needsFootage;
	}

	public synchronized void setNeedsFootage(boolean needsFootage) {
		this.needsFootage = needsFootage;
	}

	public synchronized boolean needsLegal() {
		return needsLegal;
	}

	public synchronized void setNeedsLegal(boolean needsLegal) {
		this.needsLegal = needsLegal;
	}

	public synchronized boolean apprResearch() {
		return apprResearch;
	}

	public synchronized void setApprResearch(boolean apprResearch) {
		this.apprResearch = apprResearch;
	}

	public synchronized boolean apprPhotoEdit() {
		return apprPhotoEdit;
	}

	public synchronized void setApprPhotoEdit(boolean apprPhotoEdit) {
		this.apprPhotoEdit = apprPhotoEdit;
	}

	public synchronized boolean apprFootage() {
		return apprFootage;
	}

	public synchronized void setApprFootage(boolean apprFootage) {
		this.apprFootage = apprFootage;
	}

	public synchronized boolean apprLegal() {
		return apprLegal;
	}

	public synchronized void setApprLegal(boolean apprLegal) {
		this.apprLegal = apprLegal;
	}

	public synchronized GrfxOrder getGrfxOrder() {
		return grfxOrder;
	}

	public synchronized void setGrfxOrder(GrfxOrder grfxOrder) {
		this.grfxOrder = grfxOrder;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (apprFootage ? 1231 : 1237);
		result = prime * result + (apprLegal ? 1231 : 1237);
		result = prime * result + (apprPhotoEdit ? 1231 : 1237);
		result = prime * result + (apprResearch ? 1231 : 1237);
		result = prime * result + ((filename == null) ? 0 : filename.hashCode());
		result = prime * result + ((footageList == null) ? 0 : footageList.hashCode());
		result = prime * result + ((grfxOrder == null) ? 0 : grfxOrder.hashCode());
		result = prime * result + (needsFootage ? 1231 : 1237);
		result = prime * result + (needsLegal ? 1231 : 1237);
		result = prime * result + (needsPhotoEdit ? 1231 : 1237);
		result = prime * result + (needsResearch ? 1231 : 1237);
		result = prime * result + ((notes == null) ? 0 : notes.hashCode());
		result = prime * result + ((stillList == null) ? 0 : stillList.hashCode());
		result = prime * result + ((textList == null) ? 0 : textList.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CoreGrfxItem other = (CoreGrfxItem) obj;
		if (apprFootage != other.apprFootage)
			return false;
		if (apprLegal != other.apprLegal)
			return false;
		if (apprPhotoEdit != other.apprPhotoEdit)
			return false;
		if (apprResearch != other.apprResearch)
			return false;
		if (filename == null) {
			if (other.filename != null)
				return false;
		} else if (!filename.equals(other.filename))
			return false;
		if (footageList == null) {
			if (other.footageList != null)
				return false;
		} else if (!footageList.equals(other.footageList))
			return false;
		if (grfxOrder == null) {
			if (other.grfxOrder != null)
				return false;
		} else if (!grfxOrder.equals(other.grfxOrder))
			return false;
		if (needsFootage != other.needsFootage)
			return false;
		if (needsLegal != other.needsLegal)
			return false;
		if (needsPhotoEdit != other.needsPhotoEdit)
			return false;
		if (needsResearch != other.needsResearch)
			return false;
		if (notes == null) {
			if (other.notes != null)
				return false;
		} else if (!notes.equals(other.notes))
			return false;
		if (stillList == null) {
			if (other.stillList != null)
				return false;
		} else if (!stillList.equals(other.stillList))
			return false;
		if (textList == null) {
			if (other.textList != null)
				return false;
		} else if (!textList.equals(other.textList))
			return false;
		return true;
	}


}
